import service from '../service/api'


  // 获取验证码
  export function getCodeImg() {
    return service({
      url: '/captchaImage',
      headers: {
        isToken: false
      },
      method: 'get',
      timeout: 20000
    })
  }


  export function login(username, password, code, uuid) {
    const data = {
      username,
      password,
      code,
      uuid
    }
    return service({
      //url: '/auth/login',    //cloud
      url: '/login',
      headers: {
        isToken: false
      },
      method: 'post',
      data: data
    })
  }

  
  // 获取用户详细信息
export function getInfo() {
  return service({
    //url: '/system/getInfo',    //cloud
    //url: '/getInfo',
    url: '/system/user/getInfo', //go
    method: 'get'
  })
}

export function logout() {
  return service({
    url: '/logout',
    method: 'post',
  })
}
